package org.example.wumeng.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;


@EqualsAndHashCode(callSuper = false)
@TableName("t_prescription")
@ApiModel(value = "Prescription对象", description = "方剂信息表")
public class Prescription {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "方剂名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "方剂分类")
    @TableField("category")
    private String category;

    @ApiModelProperty(value = "出处")
    @TableField("source")
    private String source;

    @ApiModelProperty(value = "药物组成")
    @TableField("composition")
    private String composition;

    @ApiModelProperty(value = "用法用量")
    @TableField("usage")
    private String usage;

    @ApiModelProperty(value = "功效")
    @TableField("functions")
    private String functions;

    @ApiModelProperty(value = "主治")
    @TableField("indications")
    private String indications;

    @ApiModelProperty(value = "方解")
    @TableField("analysis")
    private String analysis;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    public Prescription(Long id, String name, String category, String source, String composition, String usage, String functions, String indications, String analysis, LocalDateTime createTime, LocalDateTime updateTime) {
        this.id = id;
        this.name = name;
        this.category = category;
        this.source = source;
        this.composition = composition;
        this.usage = usage;
        this.functions = functions;
        this.indications = indications;
        this.analysis = analysis;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getComposition() {
        return composition;
    }

    public void setComposition(String composition) {
        this.composition = composition;
    }

    public String getUsage() {
        return usage;
    }

    public void setUsage(String usage) {
        this.usage = usage;
    }

    public String getFunctions() {
        return functions;
    }

    public void setFunctions(String functions) {
        this.functions = functions;
    }

    public String getIndications() {
        return indications;
    }

    public void setIndications(String indications) {
        this.indications = indications;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Prescription{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", category='" + category + '\'' +
                ", source='" + source + '\'' +
                ", composition='" + composition + '\'' +
                ", usage='" + usage + '\'' +
                ", functions='" + functions + '\'' +
                ", indications='" + indications + '\'' +
                ", analysis='" + analysis + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}